// custom-tab-bar/index.js
Component({
  
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#ff7f00",
    list: [{
      pagePath: "/pages/index/index",
      iconPath: "/images/foot/home.png",
      selectedIconPath: "/images/foot/home_sel.png",
      text: "首页"
    }, {
      pagePath: "/pages/mine/mine",
      iconPath: "/images/foot/mine.png",
      selectedIconPath: "/images/foot/mine_sel.png",
      text: "我的"
    }]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
    
    }
  }
})
